Is each of the following a different character?

0       O         o

A good answer might be:

Yes. Each of the above ("zero," "Capital O", and "lower case "o") is a different character and will have a completely different 16 bit code.


Character Literals

In a program, a character literal is surrounded with an apostrophe on both sides:

'm'          'y'               'A'

In a program, control characters are represented with several characters inside the apostrophes:

'\n'          '\t'           '\377'

Each of these is what you do in a program to get a single char. The first one represents the 16 bit newline character, the second on represents the tabulation character, and the last one is the delete character. (The Java documentation has a complete list.)

QUESTION 14:

What is wrong with the following char literal:

"W"